package com.sauron.starter.proxy.staticDemo;

/**
 * 静态代理类
 *
 * GameFactory --> StaticProxy --> Consumer
 *      |--> PS4
 *      |--> SWITCH
 */
public class StaticProxy implements GameFactory{

    GameFactory factory;

    public StaticProxy(GameFactory factory){
        this.factory = factory;
    }

    @Override
    public String make() {

        before();
        after();
        String make = factory.make();
        System.out.println("proxy make from factory "+make);
        return make;

    }

    private void after() {
    }

    private void before() {
    }
}
